<?php
use common\components\widgets\Datetimepicker;
use common\components\helpers\Fun;
use common\components\extenders\MenuManage;
use doumiaoduo\layer\LayerConfirmWidget;
use doumiaoduo\layer\LayerIframeWidget;

LayerConfirmWidget::widget();
LayerIframeWidget::widget();
use yii\helpers\Html;
Datetimepicker::widget(['flag'=>'timepicker']);
Datetimepicker::widget(['timepicker' => 'true','datepicker'=>'false','format'=>'H:i','step'=>'5']);
?>
<div class="yx-praise-list-box yx-praise-box yx-radius2">
    <div id="search-area" class="yx-bgf7f7f7 yx-radius5 zx-mg yx-function2 yx-pr0">
            <?= Html::beginForm(Fun::url(['artclassmanage/index']), 'get', ['enctype' => 'multipart/form-data']) ?>
            <?= \common\components\helpers\Search::textInput('course', \Yii::$app->request->get('course'), ['label'=>'课程名称','class' => 'yx-width150 zx-lh24 yx-ml6']); ?>
            <?= \common\components\helpers\Search::dropDownList('status', \Yii::$app->request->get('status'), [null=>'请选择',0=>'未开班',1=>'已开班',2=>'已结课'],['label'=>'状态','class' => 'diy_select_txt','promote'=>'请选择']); ?>
            <?= \common\components\helpers\Search::submitButton('搜索', ['id'=>'search-handle','class'=>"yx-search yx-radius2"]); ?>
            <?php Html::endForm() ?>
        </div>
        <div class="docs-main zx-mg">
            <table id="tablesaw" class="tablesaw table yx-table1 yx-table3 table-striped with-check" data-shelve_url="<?=Fun::url('newclassmanage/generatedgoods')?>"  data-tablesaw-mode="swipe" data-tablesaw-minimap >
                <thead>
                <tr class="yx-bgd2f6ec">
                    <th>课程名称</th>
                    <th>类型</th>
                    <th>报名人数</th>
                    <th>上课时间</th>
                    <th>开课时间</th>
                    <th>状态</th>
                    <th>操作</th>
                </tr>
                </thead>
            <?php if($data != null) { ?>
                  <?php foreach ($data as $item) { ?>
                    <tr>
                        <td><?=$item['arttitle']?></td>
                        <td><?=$item['arttitle_type']?></td>
                        <td><?=$item['student_count']?></td>
                        <td><?=$item['arttime']?></td>
                        <td><?=$item['start_day']?></td>
                        <td><?=$item['status_name']?></td>
                        <td><?=$item['artoperate']?></td>
                    </tr>
                  <?php } ?>
            <?php } ?>
            </table>
            <div style="text-align: right"><?= common\components\widgets\GoPager::widget(['pagination' => $pages]) ?></div>
        </div>
</div>